using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PapyrusRoom_OverworldsAndOgres : MonoBehaviour
{
	[SerializeField]
	private int CutsceneIndex;

	[Header("-- References --")]
	[SerializeField]
	private Transform PapyrusTransform;

	[SerializeField]
	private Animator PapyrusAnimator;

	[SerializeField]
	private Animator PapyrusAngryEyebrows;

	[SerializeField]
	private INT_TalkingAnimation PapyrusTalkController;

	[SerializeField]
	private Animator PapyrusArmorAnimator;

	[SerializeField]
	private Animator SansArmorAnimator;

	[SerializeField]
	private Susie_Follower Susie;

	[SerializeField]
	private PlayerManager Kris;

	[SerializeField]
	private Transform Berdly;

	[SerializeField]
	private Animator BerdlyAnimator;

	[SerializeField]
	private Transform Sans;

	[SerializeField]
	private Animator SansAnimator;

	[SerializeField]
	private Animator SansArmAnimator;

	[SerializeField]
	private ParticleSystem SansDice1;

	[SerializeField]
	private ParticleSystem SansDice2;

	[SerializeField]
	private Sprite[] DiceSprites;

	[SerializeField]
	private GameObject OAOShadow;

	[SerializeField]
	private Animator OAODungeonShadowAnimator;

	[SerializeField]
	private Animator OAODungeonGoldShadowAnimator;

	[SerializeField]
	private Animator OAODungeonShadowGoblinAnimator;

	[SerializeField]
	private Animator OAODungeonShadowBlackAnimator;

	[SerializeField]
	private Animator OAODungeonShadowBridgeAnimator;

	[SerializeField]
	private Animator OAODungeonShadowDragonAnimator;

	[SerializeField]
	private Animator OAODungeonShadowFirewallShadow;

	[SerializeField]
	private Animator OAODungeonShadowFirewall;

	[SerializeField]
	private Animator OAODungeonShadowWhite;

	[SerializeField]
	private Animator OAODungeonShadowFinale;

	[SerializeField]
	private Transform OAOTable;

	[SerializeField]
	private Transform OAOMysticalArtifact;

	[SerializeField]
	private AudioClip mus_campaignover;

	[SerializeField]
	private HypothesisGoal goal_win;

	[SerializeField]
	private SPR_YSorting[] sortedObjects;

	[SerializeField]
	private bool KrisPreviousTurn_Fight;

	[SerializeField]
	private CameraManager PlayerCamera;

	[Header("-- Cutscene Chats --")]
	[SerializeField]
	private INT_Chat CutsceneChatter;

	[SerializeField]
	private CHATBOXTEXT[] CutsceneChats;

	[Header("-- Cutscene Sounds --")]
	[SerializeField]
	private AudioSource CutsceneSource;

	[SerializeField]
	private AudioClip[] CutsceneSounds;

	[SerializeField]
	private AudioClip Music_TGAOATLEWMB;

	[SerializeField]
	private AudioClip Music_NoSound;

	[SerializeField]
	private AudioClip Music_TGAOATLEOTT;

	[SerializeField]
	private AudioClip Music_AdventureStart;

	[SerializeField]
	private AudioClip Music_Rumbling;

	[Header("-- Debug --")]
	[SerializeField]
	private GameObject[] Debug_StuffToEnable;

	[SerializeField]
	private GameObject[] Debug_StuffToDisable;

	[SerializeField]
	private Vector2[] Debug_StartCharacterPositions;

	[Header("-- OAO Shared --")]
	[SerializeField]
	private float papyrusDamage;

	[SerializeField]
	private float susieDamage;

	[SerializeField]
	private float krisDamage;

	[SerializeField]
	private float berdlyDamage;

	[Header("-- Goblin Fight --")]
	[SerializeField]
	private float goblinDamage;

	[Header("-- 3 Door Choice --")]
	private string ThreeDoorChoice = "";

	[SerializeField]
	private Sprite OgreOutline;

	[Header("-- After OAO --")]
	[SerializeField]
	private Vector2[] BerdlyExitWalkPositions;

	[SerializeField]
	private Vector2[] BerdlyExitWalKDirections;

	[SerializeField]
	private Vector2[] SusieKrisWalkPositions;

	[SerializeField]
	private Vector2[] SusieKrisWalKDirections;

	[SerializeField]
	private Vector2[] SansWalkPositions;

	[SerializeField]
	private Vector2[] SansWalkDirections;

	private void Start()
	{
		mus_campaignover.LoadAudioData();
	}

	private void Update()
	{
		if (CutsceneIndex > 0)
		{
			Kris._PlayerState = PlayerManager.PlayerState.Cutscene;
			LightworldMenu.Instance.CanOpenMenu = false;
			Susie.FollowingEnabled = false;
			Susie.AnimationOverriden = false;
		}
		if (Input.GetKeyDown((KeyCode)104) && DRHDebugManager.instance.DebugModeEnabled)
		{
			Debug_StartCutscene();
		}
	}

	public void StartCutscene()
	{
		PapyrusTalkController.TargetChat = CutsceneChatter;
		((MonoBehaviour)this).StartCoroutine(Cutscene());
	}

	public void IncrementCutsceneIndex()
	{
		CutsceneIndex++;
	}

	private void RunFreshChat(CHATBOXTEXT text, int index, bool ForcePosition, bool OnBottom)
	{
		CutsceneChatter.FirstTextPlayed = false;
		CutsceneChatter.CurrentIndex = index;
		CutsceneChatter.FinishedText = false;
		CutsceneChatter.Text = text;
		if (ForcePosition)
		{
			CutsceneChatter.ManualTextboxPosition = true;
			CutsceneChatter.OnBottom = OnBottom;
		}
		CutsceneChatter.RUN();
	}

	private IEnumerator Cutscene()
	{
		Kris = PlayerManager.Instance;
		PlayerCamera = CameraManager.instance;
		yield return (object)new WaitForSeconds(0.2f);
		ActivePartyMember activePartyMember = PartyMemberSystem.Instance.HasMemberInParty(PartyMemberSystem.Instance.Default_Susie);
		if (activePartyMember != null)
		{
			MonoBehaviour.print((object)activePartyMember.PartyMemberDescription);
			Susie = activePartyMember.PartyMemberFollowSettings;
		}
		else
		{
			Debug.LogError((object)"Susie is not in the party?????");
		}
		Kris._PAnimation.FootstepsEnabled = false;
		((Behaviour)((Component)Kris._PMove).GetComponent<Collider2D>()).enabled = false;
		Vector3 val = default(Vector3);
		while (((Component)PlayerCamera).transform.position.x != OAOTable.position.x || ((Component)PlayerCamera).transform.position.y != -0.45f)
		{
			yield return null;
			((Vector3)(ref val))._002Ector(OAOTable.position.x, -0.45f, ((Component)PlayerCamera).transform.position.z);
			((Component)PlayerCamera).transform.position = Vector3.MoveTowards(((Component)PlayerCamera).transform.position, val, 3f * Time.deltaTime);
		}
		yield return (object)new WaitForSeconds(0.5f);
		OAOShadow.SetActive(true);
		CutsceneSource.PlayOneShot(CutsceneSounds[1]);
		yield return (object)new WaitForSeconds(1f);
		MusicManager.PlaySong(Music_TGAOATLEWMB, FadePreviousSong: false, 0f);
		IncrementCutsceneIndex();
		RunFreshChat(CutsceneChats[0], 0, ForcePosition: true, OnBottom: false);
		SPR_YSorting[] array = sortedObjects;
		foreach (SPR_YSorting obj in array)
		{
			((Behaviour)obj).enabled = false;
			((Renderer)obj.SPR).sortingOrder = 0;
		}
		OAODungeonShadowAnimator.Play("OAO_ShadowDungeon_FadeIn");
		while (CutsceneIndex != 2)
		{
			yield return null;
		}
		yield return (object)new WaitForSeconds(2.25f);
		RunFreshChat(CutsceneChats[0], 1, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 3)
		{
			yield return null;
		}
		yield return (object)new WaitForSeconds(2.25f);
		RunFreshChat(CutsceneChats[0], 2, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 4)
		{
			yield return null;
		}
		yield return (object)new WaitForSeconds(2.25f);
		RunFreshChat(CutsceneChats[0], 3, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 5)
		{
			yield return null;
		}
		MusicManager.StopSong(Fade: true, 0.25f);
		yield return (object)new WaitForSeconds(0.25f);
		PlayerCamera.ReverbFilter.reverbPreset = (AudioReverbPreset)0;
		CutsceneSource.PlayOneShot(CutsceneSounds[2]);
		OAODungeonShadowGoblinAnimator.Play("OAO_ShadowDungeon_FadeIn");
		yield return (object)new WaitForSeconds(1.5f);
		MusicManager.PlaySong(Music_TGAOATLEOTT, FadePreviousSong: false, 0f);
		RunFreshChat(CutsceneChats[1], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 6)
		{
			yield return null;
		}
		Sans_ThrowDice(1, 4);
		goblinDamage += 5f;
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[2], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 7)
		{
			yield return null;
		}
		Sans_ThrowDice(6, 2);
		goblinDamage += 8f;
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[2], 1, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 8)
		{
			yield return null;
		}
		if (KrisPreviousTurn_Fight)
		{
			Sans_ThrowDice(4, 6);
			goblinDamage += 10f;
			yield return (object)new WaitForSeconds(1.65f);
			RunFreshChat(CutsceneChats[2], 2, ForcePosition: true, OnBottom: false);
			while (CutsceneIndex != 9)
			{
				yield return null;
			}
		}
		else
		{
			CutsceneIndex = 9;
		}
		CutsceneIndex = 9;
		Sans_ThrowDice(5, 1);
		yield return (object)new WaitForSeconds(1.65f);
		if (KrisPreviousTurn_Fight)
		{
			RunFreshChat(CutsceneChats[3], 0, ForcePosition: true, OnBottom: false);
			krisDamage += 6f;
			susieDamage += 6f;
			berdlyDamage += 6f;
			papyrusDamage += 3f;
		}
		else
		{
			RunFreshChat(CutsceneChats[3], 1, ForcePosition: true, OnBottom: false);
			krisDamage += 3f;
			susieDamage += 3f;
			berdlyDamage += 3f;
			papyrusDamage += 2f;
		}
		while (CutsceneIndex != 10)
		{
			yield return null;
		}
		ChatboxManager.Instance.EndText();
		yield return (object)new WaitForSeconds(0.5f);
		if (KrisPreviousTurn_Fight)
		{
			RunFreshChat(CutsceneChats[3], 3, ForcePosition: true, OnBottom: false);
		}
		else
		{
			RunFreshChat(CutsceneChats[3], 4, ForcePosition: true, OnBottom: false);
		}
		while (CutsceneIndex != 11)
		{
			yield return null;
		}
		Sans_ThrowDice(5, 2);
		goblinDamage += 7f;
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[4], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 12)
		{
			yield return null;
		}
		Sans_ThrowDice(4, 5);
		goblinDamage += 9f;
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[4], 1, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 13)
		{
			yield return null;
		}
		Sans_ThrowDice(2, 1);
		susieDamage -= 3f;
		berdlyDamage -= 3f;
		krisDamage -= 3f;
		papyrusDamage -= 3f;
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[4], 2, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 14)
		{
			yield return null;
		}
		if (KrisPreviousTurn_Fight)
		{
			Sans_ThrowDice(4, 6);
			goblinDamage += 10f;
			yield return (object)new WaitForSeconds(1.65f);
			RunFreshChat(CutsceneChats[4], 3, ForcePosition: true, OnBottom: false);
			while (CutsceneIndex != 15)
			{
				yield return null;
			}
		}
		else
		{
			CutsceneIndex = 15;
		}
		Sans_ThrowDice(4, 4);
		yield return (object)new WaitForSeconds(1.65f);
		if (KrisPreviousTurn_Fight)
		{
			RunFreshChat(CutsceneChats[5], 0, ForcePosition: true, OnBottom: false);
			krisDamage += 8f;
			susieDamage += 8f;
			berdlyDamage += 8f;
			papyrusDamage += 8f;
		}
		else
		{
			RunFreshChat(CutsceneChats[5], 1, ForcePosition: true, OnBottom: false);
			krisDamage += 4f;
			susieDamage += 4f;
			berdlyDamage += 4f;
			papyrusDamage += 4f;
		}
		while (CutsceneIndex != 16)
		{
			yield return null;
		}
		ChatboxManager.Instance.EndText();
		yield return (object)new WaitForSeconds(0.5f);
		RunFreshChat(CutsceneChats[5], 2, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 17)
		{
			yield return null;
		}
		Sans_ThrowDice(1, 3);
		goblinDamage += 4f;
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[6], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 18)
		{
			yield return null;
		}
		Sans_ThrowDice(2, 2);
		goblinDamage += 4f;
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[6], 1, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 19)
		{
			yield return null;
		}
		Sans_ThrowDice(6, 6);
		goblinDamage += 12f;
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[6], 2, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 20)
		{
			yield return null;
		}
		if (KrisPreviousTurn_Fight)
		{
			Sans_ThrowDice(5, 3);
			goblinDamage += 8f;
			yield return (object)new WaitForSeconds(1.65f);
			RunFreshChat(CutsceneChats[6], 3, ForcePosition: true, OnBottom: false);
			while (CutsceneIndex != 21)
			{
				yield return null;
			}
		}
		else
		{
			CutsceneIndex = 21;
		}
		MusicManager.StopSong(Fade: true, 0.25f);
		yield return (object)new WaitForSeconds(0.25f);
		PlayerCamera.ReverbFilter.reverbPreset = (AudioReverbPreset)0;
		CutsceneSource.PlayOneShot(CutsceneSounds[3]);
		OAODungeonShadowGoblinAnimator.Play("OAO_ShadowDungeon_FadeOut");
		yield return (object)new WaitForSeconds(1.5f);
		ChatboxManager.Instance.EndText();
		yield return (object)new WaitForSeconds(2f);
		RunFreshChat(CutsceneChats[7], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 22)
		{
			yield return null;
		}
		CutsceneIndex = 1;
		OAODungeonGoldShadowAnimator.Play("OAO_ShadowDungeon_FadeOut");
		CutsceneSource.PlayOneShot(CutsceneSounds[9]);
		MusicManager.PlaySong(Music_TGAOATLEWMB, FadePreviousSong: false, 0f);
		yield return (object)new WaitForSeconds(0.5f);
		RunFreshChat(CutsceneChats[8], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 2)
		{
			yield return null;
		}
		yield return null;
		CutsceneSource.PlayOneShot(CutsceneSounds[9]);
		switch (ThreeDoorChoice)
		{
		case "skull":
			IncrementCutsceneIndex();
			IncrementCutsceneIndex();
			break;
		case "questionmark":
			MusicManager.StopSong(Fade: true, 0.25f);
			OAODungeonShadowBlackAnimator.Play("OAO_ShadowDungeon_FadeIn");
			while (CutsceneIndex != 3)
			{
				yield return null;
			}
			IncrementCutsceneIndex();
			break;
		case "sword":
			yield return (object)new WaitForSeconds(1.65f);
			RunFreshChat(CutsceneChats[9], 1, ForcePosition: true, OnBottom: false);
			while (CutsceneIndex != 3)
			{
				yield return null;
			}
			MusicManager.StopSong(Fade: true, 0.25f);
			yield return (object)new WaitForSeconds(0.25f);
			PlayerCamera.ReverbFilter.reverbPreset = (AudioReverbPreset)0;
			CutsceneSource.PlayOneShot(CutsceneSounds[2]);
			((Component)OAODungeonShadowGoblinAnimator).GetComponent<SpriteRenderer>().sprite = OgreOutline;
			OAODungeonShadowGoblinAnimator.Play("OAO_ShadowDungeon_FadeIn");
			yield return (object)new WaitForSeconds(1.5f);
			RunFreshChat(CutsceneChats[9], 2, ForcePosition: true, OnBottom: false);
			while (CutsceneIndex != 4)
			{
				yield return null;
			}
			OAODungeonShadowGoblinAnimator.Play("OAO_ShadowDungeon_FadeOut");
			yield return (object)new WaitForSeconds(1f);
			break;
		}
		while (CutsceneIndex != 4)
		{
			yield return null;
		}
		if (ThreeDoorChoice == "questionmark")
		{
			((MonoBehaviour)this).StartCoroutine(EndOAO());
			yield break;
		}
		CutsceneIndex = 1;
		OAODungeonShadowBridgeAnimator.Play("OAO_ShadowDungeon_FadeIn");
		CutsceneSource.PlayOneShot(CutsceneSounds[9]);
		yield return null;
		yield return (object)new WaitForSeconds(1f);
		RunFreshChat(CutsceneChats[10], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 2)
		{
			yield return null;
		}
		MusicManager.PlaySong(Music_Rumbling, FadePreviousSong: false, 0f);
		OAODungeonShadowBridgeAnimator.Play("OAO_ShadowDungeon_Shake");
		while (CutsceneIndex != 3)
		{
			yield return null;
		}
		MusicManager.StopSong(Fade: true, 0.25f);
		yield return (object)new WaitForSeconds(0.25f);
		PlayerCamera.ReverbFilter.reverbPreset = (AudioReverbPreset)0;
		CutsceneSource.PlayOneShot(CutsceneSounds[2]);
		OAODungeonShadowDragonAnimator.Play("OAO_ShadowDungeon_FadeIn");
		OAODungeonShadowBridgeAnimator.Play("OAO_ShadowDungeon_FadeIn", -1, 1f);
		yield return (object)new WaitForSeconds(1.5f);
		CutsceneIndex = 1;
		RunFreshChat(CutsceneChats[10], 1, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 2)
		{
			yield return null;
		}
		yield return (object)new WaitForSeconds(1f);
		RunFreshChat(CutsceneChats[11], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 3)
		{
			yield return null;
		}
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[11], 1, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 4)
		{
			yield return null;
		}
		CutsceneSource.PlayOneShot(CutsceneSounds[4]);
		if (ThreeDoorChoice != "sword")
		{
			yield return (object)new WaitForSeconds(1f);
			MusicManager.PlaySong(CutsceneSounds[5], FadePreviousSong: false, 0f);
			OAODungeonShadowFirewallShadow.Play("OAO_ShadowDungeon_FadeIn", -1, 1f);
			OAODungeonShadowFirewall.Play("OAO_ShadowDungeon_FireWall", -1, 0f);
			yield return (object)new WaitForSeconds(3f);
			((MonoBehaviour)this).StartCoroutine(EndOAO());
			yield break;
		}
		yield return (object)new WaitForSeconds(1.25f);
		EveryoneShock();
		for (int j = 0; j < 4; j++)
		{
			CutsceneSource.PlayOneShot(CutsceneSounds[10]);
			if (!SettingsManager.Instance.GetBoolSettingValue("SimpleVFX"))
			{
				CutsceneUtils.ShakeTransform(((Component)PlayerCamera).transform, 0.125f, 0.7f);
			}
			yield return (object)new WaitForSeconds(0.8f);
		}
		RunFreshChat(CutsceneChats[13], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 5)
		{
			yield return null;
		}
		OAODungeonShadowFirewallShadow.speed = 1f;
		OAODungeonShadowAnimator.Play("OAO_ShadowDungeon_FadeOut", -1, 0f);
		OAODungeonShadowFirewallShadow.Play("OAO_ShadowDungeon_FadeOut", -1, 0f);
		OAODungeonShadowFirewall.speed = 1f;
		OAODungeonShadowDragonAnimator.Play("OAO_ShadowDungeon_FadeOut", -1, 0f);
		CutsceneSource.PlayOneShot(CutsceneSounds[9]);
		OAODungeonShadowFinale.Play("OAO_ShadowDungeon_FadeIn", -1, 0f);
		yield return (object)new WaitForSeconds(1.5f);
		RunFreshChat(CutsceneChats[14], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 6)
		{
			yield return null;
		}
		Sans_ThrowDice(3, 2);
		yield return (object)new WaitForSeconds(1.65f);
		RunFreshChat(CutsceneChats[14], 1, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 7)
		{
			yield return null;
		}
		EveryoneShock();
		Sans_Idle_Down();
		MusicManager.PlaySong(mus_campaignover, FadePreviousSong: false, 0f);
		((Component)OAOMysticalArtifact).gameObject.SetActive(true);
		CutsceneUtils.MoveTransformLinear(OAOMysticalArtifact, new Vector3(-1.265f, -2.01f), 6f);
		yield return (object)new WaitForSeconds(6f);
		OAODungeonShadowWhite.Play("OAO_ShadowDungeon_FadeWhite", -1, 0f);
		yield return (object)new WaitForSeconds(4f);
		HypotheticalGoalManager.Instance.CompleteGoal(goal_win);
		((MonoBehaviour)this).StartCoroutine(EndOAO());
	}

	private IEnumerator EndOAO()
	{
		MusicManager.StopSong(Fade: true, 2f);
		UI_FADE.Instance.StartFadeIn(-1, 0.25f);
		CutsceneIndex = 1;
		yield return (object)new WaitForSeconds(3f);
		EveryoneLook_AtTable();
		PlayerCamera.ReverbFilter.reverbPreset = (AudioReverbPreset)0;
		Object.Destroy((Object)(object)((Component)((Component)OAOMysticalArtifact).GetComponentInChildren<Animator>()).gameObject);
		OAODungeonShadowBridgeAnimator.Play("OAO_ShadowDungeon_FadeOut", -1, 1f);
		OAODungeonShadowDragonAnimator.Play("OAO_ShadowDungeon_FadeOut", -1, 1f);
		OAODungeonShadowFirewallShadow.Play("OAO_ShadowDungeon_FadeOut", -1, 1f);
		OAODungeonShadowFirewall.Play("OAO_ShadowDungeon_FadeOut", -1, 1f);
		OAODungeonShadowAnimator.Play("OAO_ShadowDungeon_FadeOut", -1, 1f);
		OAODungeonShadowBlackAnimator.Play("OAO_ShadowDungeon_FadeOut", -1, 1f);
		OAODungeonShadowFinale.Play("OAO_ShadowDungeon_FadeOut", -1, 1f);
		OAODungeonShadowWhite.Play("OAO_ShadowDungeon_FadeOut", -1, 1f);
		((Component)PapyrusArmorAnimator).transform.position = Vector2.op_Implicit(Vector2.up * 500f);
		((Component)SansArmorAnimator).transform.position = Vector2.op_Implicit(Vector2.up * 500f);
		OAOShadow.SetActive(false);
		SPR_YSorting[] array = sortedObjects;
		for (int i = 0; i < array.Length; i++)
		{
			((Behaviour)array[i]).enabled = true;
		}
		Vector3 position = default(Vector3);
		((Vector3)(ref position))._002Ector(0f, -0.45f, ((Component)PlayerCamera).transform.position.z);
		((Component)PlayerCamera).transform.position = position;
		yield return (object)new WaitForSeconds(0.1f);
		UI_FADE.Instance.StartFadeOut(0.25f);
		yield return (object)new WaitForSeconds(2.5f);
		RunFreshChat(CutsceneChats[12], 0, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 2)
		{
			yield return null;
		}
		yield return (object)new WaitForSeconds(0.75f);
		CutsceneUtils.ShakeTransform(((Component)Berdly).transform);
		CutsceneUtils.ShakeTransform(((Component)Susie).transform);
		CutsceneSource.PlayOneShot(CutsceneSounds[6]);
		CutsceneSource.PlayOneShot(CutsceneSounds[7]);
		Berdly_Shock_Left();
		Susie.SusieAnimator.Play("Susie_Shock_NoShake");
		yield return (object)new WaitForSeconds(1.5f);
		RunFreshChat(CutsceneChats[12], 1, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 3)
		{
			yield return null;
		}
		int berdlyWalkIndex = 0;
		while (Vector2.op_Implicit(Berdly.position) != BerdlyExitWalkPositions[1])
		{
			yield return null;
			if (Vector2.op_Implicit(Berdly.position) != BerdlyExitWalkPositions[berdlyWalkIndex])
			{
				BerdlyAnimator.speed = 2.5f;
				BerdlyAnimator.Play("Walk");
				BerdlyAnimator.SetFloat("MOVEMENTX", BerdlyExitWalKDirections[berdlyWalkIndex].x);
				BerdlyAnimator.SetFloat("MOVEMENTY", BerdlyExitWalKDirections[berdlyWalkIndex].y);
				Susie.RotateSusieTowardsPosition(Vector2.op_Implicit(PapyrusTransform.position));
				Berdly.position = Vector2.op_Implicit(Vector2.MoveTowards(Vector2.op_Implicit(Berdly.position), BerdlyExitWalkPositions[berdlyWalkIndex], 8f * Time.deltaTime));
			}
			else
			{
				berdlyWalkIndex++;
			}
		}
		((Renderer)((Component)BerdlyAnimator).GetComponent<SpriteRenderer>()).enabled = false;
		CutsceneSource.PlayOneShot(CutsceneSounds[8]);
		yield return (object)new WaitForSeconds(1f);
		RunFreshChat(CutsceneChats[12], 2, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 4)
		{
			yield return null;
		}
		PapyrusAnimator.Play("Papyrus_Phone_Left");
		int susieWalkIndex = 0;
		int krisWalkIndex = 0;
		while (Vector2.op_Implicit(((Component)Susie).transform.position) != SusieKrisWalkPositions[2] || ((Renderer)((Component)Susie.SusieAnimator).GetComponent<SpriteRenderer>()).enabled || Vector2.op_Implicit(((Component)Kris).transform.position) != SusieKrisWalkPositions[0])
		{
			yield return null;
			if (susieWalkIndex <= 2)
			{
				if (Vector2.op_Implicit(((Component)Susie).transform.position) != SusieKrisWalkPositions[susieWalkIndex])
				{
					Susie.SusieAnimator.Play("Walk");
					((Component)Susie).transform.position = Vector2.op_Implicit(Vector2.MoveTowards(Vector2.op_Implicit(((Component)Susie).transform.position), SusieKrisWalkPositions[susieWalkIndex], 4f * Time.deltaTime));
					Susie.RotateSusieToDirection(SusieKrisWalKDirections[susieWalkIndex]);
				}
				else
				{
					susieWalkIndex++;
				}
			}
			else if (((Renderer)((Component)Susie.SusieAnimator).GetComponent<SpriteRenderer>()).enabled)
			{
				((Renderer)((Component)Susie.SusieAnimator).GetComponent<SpriteRenderer>()).enabled = false;
				CutsceneSource.PlayOneShot(CutsceneSounds[8]);
			}
			if (krisWalkIndex < 1)
			{
				if (Vector2.op_Implicit(((Component)Kris).transform.position) != SusieKrisWalkPositions[krisWalkIndex])
				{
					Kris._PMove.AnimationOverriden = true;
					Kris._PMove._anim.SetBool("MOVING", true);
					Kris._PMove.RotatePlayerAnim(SusieKrisWalKDirections[krisWalkIndex]);
					((Component)Kris).transform.position = Vector2.op_Implicit(Vector2.MoveTowards(Vector2.op_Implicit(((Component)Kris).transform.position), SusieKrisWalkPositions[krisWalkIndex], 2.25f * Time.deltaTime));
				}
				else
				{
					krisWalkIndex++;
				}
			}
		}
		if (((Renderer)((Component)Susie.SusieAnimator).GetComponent<SpriteRenderer>()).enabled)
		{
			((Renderer)((Component)Susie.SusieAnimator).GetComponent<SpriteRenderer>()).enabled = false;
			CutsceneSource.PlayOneShot(CutsceneSounds[8]);
		}
		RunFreshChat(CutsceneChats[12], 3, ForcePosition: true, OnBottom: false);
		Kris._PMove._anim.SetBool("MOVING", false);
		Kris._PMove.RotatePlayerAnim(Vector2.left);
		while (CutsceneIndex != 5)
		{
			yield return null;
		}
		int sansWalkIndex = 0;
		while (Vector2.op_Implicit(((Component)Sans).transform.position) != SansWalkPositions[1])
		{
			yield return null;
			if (sansWalkIndex < 2)
			{
				if (Vector2.op_Implicit(((Component)Sans).transform.position) != SansWalkPositions[sansWalkIndex])
				{
					SansAnimator.Play("Walk");
					SansArmorAnimator.Play("SansArmor_Walk");
					SansAnimator.SetBool("MOVING", true);
					CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", SansWalkDirections[sansWalkIndex]);
					CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", SansWalkDirections[sansWalkIndex]);
					Kris._PMove.RotatePlayerAnimTowardsPosition(Vector2.op_Implicit(((Component)SansAnimator).transform.position));
					((Component)Sans).transform.position = Vector2.op_Implicit(Vector2.MoveTowards(Vector2.op_Implicit(((Component)Sans).transform.position), SansWalkPositions[sansWalkIndex], 3f * Time.deltaTime));
				}
				else
				{
					sansWalkIndex++;
				}
			}
			else
			{
				SansAnimator.SetBool("MOVING", false);
				SansArmorAnimator.Play("SansArmor");
			}
		}
		SansAnimator.SetBool("MOVING", false);
		RunFreshChat(CutsceneChats[12], 4, ForcePosition: true, OnBottom: false);
		while (CutsceneIndex != 6)
		{
			yield return null;
		}
		while (Vector2.op_Implicit(((Component)Kris).transform.position) != SusieKrisWalkPositions[2])
		{
			yield return null;
			if (krisWalkIndex < 3)
			{
				if (Vector2.op_Implicit(((Component)Kris).transform.position) != SusieKrisWalkPositions[krisWalkIndex])
				{
					Kris._PMove.AnimationOverriden = true;
					Kris._PMove._anim.SetBool("MOVING", true);
					Kris._PMove.RotatePlayerAnim(SusieKrisWalKDirections[krisWalkIndex]);
					((Component)Kris).transform.position = Vector2.op_Implicit(Vector2.MoveTowards(Vector2.op_Implicit(((Component)Kris).transform.position), SusieKrisWalkPositions[krisWalkIndex], 2f * Time.deltaTime));
				}
				else
				{
					krisWalkIndex++;
				}
			}
		}
		((Component)Kris).transform.position = Vector2.op_Implicit(Vector2.left * 70f);
		CutsceneSource.PlayOneShot(CutsceneSounds[8]);
		yield return (object)new WaitForSeconds(1.5f);
		UI_FADE.Instance.StartFadeIn(37, 1f, UnpauseOnEnd: true, NewMainMenuManager.MainMenuStates.Hypothetical);
	}

	public void Sans_ThrowDice(int Number1, int Number2)
	{
		((MonoBehaviour)this).StartCoroutine(Sans_ThrowDice_Timer(Number1, Number2));
	}

	private IEnumerator Sans_ThrowDice_Timer(int Number1, int Number2)
	{
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		SansArmAnimator.Play("Sans_OAOHand_ThrowDice");
		SansAnimator.Play("Sans_Has_His_Right_Arm_Chopped_Off_For_One_Second_AHHHHHHHHH_GORE");
		yield return (object)new WaitForSeconds(0.183f);
		TextureSheetAnimationModule dice1module = SansDice1.textureSheetAnimation;
		((TextureSheetAnimationModule)(ref dice1module)).SetSprite(0, DiceSprites[Number1]);
		SansDice1.Play();
		TextureSheetAnimationModule dice2module = SansDice2.textureSheetAnimation;
		((TextureSheetAnimationModule)(ref dice2module)).SetSprite(0, DiceSprites[Number2]);
		SansDice2.Play();
		CutsceneSource.PlayOneShot(CutsceneSounds[0]);
		for (int i = 0; i < Random.Range(4, 10); i++)
		{
			yield return (object)new WaitForSeconds(Random.Range(0.05f, 0.1f));
			((TextureSheetAnimationModule)(ref dice1module)).SetSprite(0, DiceSprites[Random.Range(1, 6)]);
			yield return (object)new WaitForSeconds(Random.Range(0.05f, 0.1f));
			((TextureSheetAnimationModule)(ref dice2module)).SetSprite(0, DiceSprites[Random.Range(1, 6)]);
		}
		yield return (object)new WaitForSeconds(Random.Range(0.05f, 0.1f));
		((TextureSheetAnimationModule)(ref dice1module)).SetSprite(0, DiceSprites[Number1]);
		((TextureSheetAnimationModule)(ref dice2module)).SetSprite(0, DiceSprites[Number2]);
	}

	public void Sans_Idle_Down()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
	}

	public void Sans_Idle_Left()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.left);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.left);
	}

	public void Berdly_Idle_Down()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		BerdlyAnimator.Play("Idle");
		CutsceneUtils.RotateCharacterToDirection(BerdlyAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
	}

	public void Berdly_Idle_Up()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		BerdlyAnimator.Play("Idle");
		CutsceneUtils.RotateCharacterToDirection(BerdlyAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.up);
	}

	public void Berdly_Idle_Left()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		BerdlyAnimator.Play("Idle");
		CutsceneUtils.RotateCharacterToDirection(BerdlyAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.left);
	}

	public void Berdly_Idle_Right()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		BerdlyAnimator.Play("Idle");
		CutsceneUtils.RotateCharacterToDirection(BerdlyAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.right);
	}

	public void Berdly_Praise()
	{
		BerdlyAnimator.Play("berdly_praise");
	}

	public void Berdly_Shock_Left()
	{
		BerdlyAnimator.Play("berdly_shock_left");
	}

	public void EveryoneLook_AtSans()
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.right);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.right);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.right);
		Susie.SusieAnimator.Play("Idle");
		Kris._PMove.RotatePlayerAnim(Vector2.up);
		Susie.RotateSusieToDirection(Vector2.up);
		Berdly_Idle_Up();
	}

	public void EveryoneLook_AtPapyrus()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.left);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.left);
		Susie.SusieAnimator.Play("Idle");
		Kris._PMove.RotatePlayerAnim(Vector2.up);
		Susie.RotateSusieToDirection(Vector2.up);
		Berdly_Idle_Up();
	}

	public void EveryoneLook_AtSusie()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00de: Unknown result type (might be due to invalid IL or missing references)
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		Kris._PMove.RotatePlayerAnim(Vector2.right);
		Berdly_Idle_Right();
	}

	public void EveryoneLook_AtBerdly()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		Susie.SusieAnimator.Play("Idle");
		Susie.RotateSusieToDirection(Vector2.left);
		Kris._PMove.RotatePlayerAnim(Vector2.right);
	}

	public void EveryoneLook_AtKris()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		Susie.SusieAnimator.Play("Idle");
		Susie.RotateSusieToDirection(Vector2.left);
		Berdly_Idle_Left();
	}

	public void EveryoneLook_AtTable()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		Susie.SusieAnimator.Play("Idle");
		Susie.RotateSusieToDirection(Vector2.up);
		Berdly_Idle_Up();
		Kris._PMove.RotatePlayerAnim(Vector2.up);
	}

	public void SansPapyrus_LookEachother()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.left);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.left);
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.right);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.right);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.right);
		Susie.SusieAnimator.Play("Idle");
		Susie.RotateSusieToDirection(Vector2.up);
		Berdly_Idle_Up();
		Kris._PMove.RotatePlayerAnim(Vector2.up);
	}

	public void EveryoneShock()
	{
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		PapyrusAnimator.Play("Papyrus_Shock_Right");
		PapyrusArmorAnimator.Play("MP_PapyrusRoom_PapyrusArmor_ShockRight");
		Susie.SusieAnimator.Play("Susie_Shock_Up");
		BerdlyAnimator.Play("berdly_shock_up");
		Kris._PMove.RotatePlayerAnim(Vector2.up);
	}

	public void PapyrusShock()
	{
		PapyrusAnimator.Play("Papyrus_Shock_Right");
		PapyrusArmorAnimator.Play("MP_PapyrusRoom_PapyrusArmor_ShockRight");
	}

	public void PapyrusPhoneLeft()
	{
		PapyrusAnimator.Play("Papyrus_Phone_Left");
	}

	public void PapyrusPhoneLeft_Delayed()
	{
		((MonoBehaviour)this).StartCoroutine(PapyrusPhoneLeft_Delayed_Timer());
	}

	private IEnumerator PapyrusPhoneLeft_Delayed_Timer()
	{
		yield return (object)new WaitForSeconds(3f);
		PapyrusAnimator.Play("Papyrus_Phone_Left");
	}

	public void PapyrusPhoneRight()
	{
		PapyrusAnimator.Play("Papyrus_Phone_Right");
	}

	public void KrisIdle_Right()
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		Kris._PMove.RotatePlayerAnim(Vector2.right);
	}

	public void KrisIdle_Up()
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		Kris._PMove.RotatePlayerAnim(Vector2.up);
	}

	public void KrisIdle_Left()
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		Kris._PMove.RotatePlayerAnim(Vector2.left);
	}

	public void SusieAnim_IdleRight()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		Susie.SusieAnimator.Play("Idle");
		Susie.RotateSusieToDirection(Vector2.right);
	}

	public void SusieAnim_IdleLeft()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		Susie.SusieAnimator.Play("Idle");
		Susie.RotateSusieToDirection(Vector2.left);
	}

	public void SusieAnim_IdleUp()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		Susie.SusieAnimator.Play("Idle");
		Susie.RotateSusieToDirection(Vector2.up);
	}

	public void SusieAnim_AngryLeft()
	{
		Susie.SusieAnimator.Play("Susie_Angry_Left");
	}

	public void SusieAnim_HeadScratch()
	{
		Susie.SusieAnimator.Play("Susie_Awkward");
	}

	public void PapyrusAnim_IdleDown()
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.down);
	}

	public void PapyrusAnim_IdleRight()
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.right);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.right);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.right);
	}

	public void PapyrusAnim_IdleLeft()
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.left);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.left);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.left);
	}

	public void PapyrusAnim_Praise()
	{
		PapyrusAnimator.Play("Papyrus_Praise");
		PapyrusArmorAnimator.Play("MP_PapyrusRoom_PapyrusArmor_Praise");
		((Component)PapyrusAngryEyebrows).gameObject.SetActive(false);
	}

	public void PapyrusEyebrows_Toggle()
	{
		((Component)PapyrusAngryEyebrows).gameObject.SetActive(!((Component)PapyrusAngryEyebrows).gameObject.activeSelf);
	}

	public void OAODoorChoice_Skull()
	{
		ThreeDoorChoice = "skull";
	}

	public void OAODoorChoice_QuestionMark()
	{
		ThreeDoorChoice = "questionmark";
	}

	public void OAODoorChoice_Sword()
	{
		ThreeDoorChoice = "sword";
	}

	public void OAODiceRoll_2()
	{
		Sans_ThrowDice(1, 1);
	}

	public void OAODiceRoll_7()
	{
		Sans_ThrowDice(4, 3);
	}

	public void OAODiceRoll_12()
	{
		Sans_ThrowDice(6, 6);
	}

	public void SetKrisPreviousTurn_Fight()
	{
		KrisPreviousTurn_Fight = true;
	}

	public void SetKrisPreviousTurn_Act()
	{
		KrisPreviousTurn_Fight = false;
	}

	public void ShowGoldShadow()
	{
		OAODungeonGoldShadowAnimator.Play("OAO_ShadowDungeon_FadeIn");
	}

	private void Debug_StartCutscene()
	{
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0157: Unknown result type (might be due to invalid IL or missing references)
		//IL_0171: Unknown result type (might be due to invalid IL or missing references)
		//IL_0186: Unknown result type (might be due to invalid IL or missing references)
		//IL_0196: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0202: Unknown result type (might be due to invalid IL or missing references)
		//IL_021e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0223: Unknown result type (might be due to invalid IL or missing references)
		//IL_023f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0244: Unknown result type (might be due to invalid IL or missing references)
		//IL_0260: Unknown result type (might be due to invalid IL or missing references)
		//IL_0265: Unknown result type (might be due to invalid IL or missing references)
		ChatboxManager.Instance.EndText();
		GameObject[] debug_StuffToDisable = Debug_StuffToDisable;
		for (int i = 0; i < debug_StuffToDisable.Length; i++)
		{
			debug_StuffToDisable[i].SetActive(false);
		}
		debug_StuffToDisable = Debug_StuffToEnable;
		for (int i = 0; i < debug_StuffToDisable.Length; i++)
		{
			debug_StuffToDisable[i].SetActive(true);
		}
		PlayerCamera.ReverbFilter.reverbPreset = (AudioReverbPreset)0;
		Kris = PlayerManager.Instance;
		PlayerCamera = CameraManager.instance;
		ActivePartyMember activePartyMember = PartyMemberSystem.Instance.HasMemberInParty(PartyMemberSystem.Instance.Default_Susie);
		if (activePartyMember != null)
		{
			MonoBehaviour.print((object)activePartyMember.PartyMemberDescription);
			Susie = activePartyMember.PartyMemberFollowSettings;
		}
		else
		{
			Debug.LogError((object)"Susie is not in the party?????");
		}
		SansAnimator.Play("Idle");
		SansAnimator.SetBool("MOVING", false);
		SansArmorAnimator.Play("SansArmor");
		CutsceneUtils.RotateCharacterToDirection(SansAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(SansArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		PapyrusAnimator.Play("IdleFace");
		PapyrusArmorAnimator.Play("PapyrusArmor");
		CutsceneUtils.RotateCharacterToDirection(PapyrusAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusArmorAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		CutsceneUtils.RotateCharacterToDirection(PapyrusAngryEyebrows, "MOVEMENTX", "MOVEMENTY", Vector2.down);
		Kris._PMove.RotatePlayerAnim(Vector2.up);
		Susie.RotateSusieToDirection(Vector2.up);
		BerdlyAnimator.Play("Idle");
		CutsceneUtils.RotateCharacterToDirection(BerdlyAnimator, "MOVEMENTX", "MOVEMENTY", Vector2.up);
		((Component)Kris).transform.position = Vector2.op_Implicit(Debug_StartCharacterPositions[0]);
		((Component)Susie).transform.position = Vector2.op_Implicit(Debug_StartCharacterPositions[1]);
		((Component)PapyrusTransform).transform.position = Vector2.op_Implicit(Debug_StartCharacterPositions[2]);
		((Component)Sans).transform.position = Vector2.op_Implicit(Debug_StartCharacterPositions[3]);
		((Component)Berdly).transform.position = Vector2.op_Implicit(Debug_StartCharacterPositions[4]);
		ChatboxManager.Instance.StoredAdditiveValues = new List<string> { "shortsword" };
		StartCutscene();
	}
}
